package com.tjbank.cssys.mybatis.mapper;

import com.tjbank.cssys.mybatis.entity.IamApi;
import com.tjbank.cssys.mybatis.entity.IamApiKey;
import com.tjbank.cssys.mybatis.sqlbuilder.IamApiSqlBuilder;

import java.util.List;

/**
 * IamApiMapper
 * 
 * @author PG(Auto Generator)
 * @version V2.0
 */
public interface IamApiMapper {

    /**
     * 根据SqlBuilder查询列表，返回值包含大字段栏位
     * 
     * @param iamApiSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamApi> selectBySqlBuilderWithBLOBs(IamApiSqlBuilder iamApiSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder查询列表，返回值不包含大字段栏位
     * 
     * @param iamApiSqlBuilder
     * @return
     * @throws Exception
     */
    public List<IamApi> selectBySqlBuilder(IamApiSqlBuilder iamApiSqlBuilder) throws RuntimeException;

    /**
     * 根据主键查询单个对象
     * 
     * @param iamApiKey
     * @return
     * @throws Exception
     */
    public IamApi selectByPrimaryKey(IamApiKey iamApiKey) throws RuntimeException;

    /**
     * 根据SqlBuilder统计记录条数
     * 
     * @param iamApiSqlBuilder
     * @return
     * @throws Exception
     */
    public long countBySqlBuilder(IamApiSqlBuilder iamApiSqlBuilder) throws RuntimeException;

    /**
     * 单条插入新增记录
     * 
     * @param iamApi
     * @return
     * @throws Exception
     */
    public int insert(IamApi iamApi) throws RuntimeException;

    /**
     * 批量插入新增记录
     * 
     * @param listIamApi
     * @return
     * @throws Exception
     */
    public int insertUseBatch(List<IamApi> listIamApi) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值会持久化到数据库
     * 
     * @param iamApiSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilder(IamApiSqlBuilder iamApiSqlBuilder) throws RuntimeException;

    /**
     * 根据SqlBuilder更新记录，空值不会持久化到数据库
     * 
     * @param iamApiSqlBuilder
     * @return
     * @throws Exception
     */
    public int updateBySqlBuilderSelective(IamApiSqlBuilder iamApiSqlBuilder) throws RuntimeException;

    /**
     * 根据主键更新记录，空值会持久化到数据库
     * 
     * @param iamApiKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKey(IamApiKey iamApiKey) throws RuntimeException;

    /**
     * 根据主键更新记录，空值不会持久化到数据库
     * 
     * @param iamApiKey
     * @return
     * @throws Exception
     */
    public int updateByPrimaryKeySelective(IamApiKey iamApiKey) throws RuntimeException;

    /**
     * 根据SqlBuilder删除记录
     * 
     * @param iamApiSqlBuilder
     * @return
     * @throws Exception
     */
    public int deleteBySqlBuilder(IamApiSqlBuilder iamApiSqlBuilder) throws RuntimeException;

    /**
     * 根据主键删除记录
     * 
     * @param iamApiKey
     * @return
     * @throws Exception
     */
    public int deleteByPrimaryKey(IamApiKey iamApiKey) throws RuntimeException;

}